class Student {

    int no;
    String name;
    public Student(int sno,String sname){
        no=sno;
        name=sname;
    }
}
class ObjiectArrayDemo {
    Student[] student=new Student[4];
    public ObjiectArrayDemo(){
        student[0]=new Student(2006090001,"小刘");
        student[1]=new Student(2006090002,"小李");
        student[2]=new Student(2006090003,"小唐");
        student[3]=new Student(2006090004,"小何");
    }
    void printArrayElement(){
        int j=1;
        for(int i=0;i<student.length;i++){
            System.out.println("第"+j+"个学生的学号是："+student[i].no+",姓名是:"+student[i].name);
            j++;
        }
    }
    public static void  main(String args[]){
        ObjiectArrayDemo ad=new ObjiectArrayDemo();
        ad.printArrayElement();
    }
}
